//
//  PageEventModelTableViewController.m
//  TRSAnalytics
//
//  Created by 824810056 on 2018/1/30.
//  Copyright © 2018年 Miridescent. All rights reserved.
//

#import "PageEventModelTableViewController.h"

#import "TRSCommen.h"

#import "TRSEventModelConfig.h"
#import "TRSAnalytics.h"

@interface PageEventModelTableViewController ()

@property (nonatomic, strong) NSMutableArray *titleArray;
@property (nonatomic, strong) NSMutableArray *detailArray;


@end

@implementation PageEventModelTableViewController
- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [TRSAnalytics pageBegin:@"1111"];
    
}
- (void)viewWillDisappear:(BOOL)animated{
//    [super viewWillDisappear:animated];
//    [TRSAnalytics pageEnd:@"1111"];
    
    NSMutableDictionary *properties = [@{} mutableCopy];
    [properties setObject:@"xxx" forKey:@"xxx"];
    [TRSAnalytics pageEnd:@"1111" properties:properties];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.titleArray = [@[] mutableCopy];
    self.detailArray = [@[] mutableCopy];
    
    [self.tableView reloadData];
    
    
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

    return self.titleArray.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *pageEventIdentifier = @"pageEventIdentifier";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:pageEventIdentifier];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:pageEventIdentifier];
    }
    cell.textLabel.text = self.titleArray[indexPath.row];
    cell.detailTextLabel.text = [NSString stringWithFormat:@"%@", self.detailArray[indexPath.row]];
    return cell;
}



@end
